package com.example.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.server.mapper.MyuserMapper;
import com.example.server.pojo.Myuser;
import com.example.server.service.IMyuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tianxiang
 * @since 2022-01-30
 */
@Service
@Transactional
public class MyuserServiceImpl extends ServiceImpl<MyuserMapper, Myuser> implements IMyuserService {

    @Autowired
    private MyuserMapper myuserMapper;

    @Override
    public List<Myuser> findUser() {
        return myuserMapper.findUser();
    }

    @Override
    public int addUser(Myuser myuser) {
         int num = myuserMapper.addUser(myuser);
         return num;
    }

    @Override
    public void delUser(int id) {
        myuserMapper.delUser(id);
    }

    @Override
    public void updateUser(Myuser myuser) {
        myuserMapper.updateUser(myuser);
    }
}
